//    Copyright (C) 2013  <lugocreation@gmail.com>
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>
package org.jpgolay.wi.customer;

import java.awt.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.*;
import org.jpgolay.gui.fixed.*;
import org.jpgolay.gui.iconBar.IconBar;
import org.jpgolay.wi.util.WIUtil;

public class CustomerGUI extends JInternalFrame {

    public CustomerGUI() {
        jContentPane = null;
        basicMenu = null;
        iconBar = null;
        mainPanel = null;
        customerSearch = null;
        jTabbedPane = null;
        addressPanel = null;
        infosPanel = null;
        addressPanel1 = null;
        namePanel = null;
        firstnameLabelAndTextField = null;
        statusLabelAndComboBox = null;
        addrLn1abelAndTextField = null;
        addrLn2abelAndTextField = null;
        cityLabelAndTextField = null;
        countryLabelAndTextField = null;
        zipLabelAndTextField = null;
        lastUpdatePanel = null;
        lastnameLabelAndTextField = null;
        stateLabelAndTextField = null;
        telLabelAndTextField = null;
        faxLabelAndTextField = null;
        bankLabelAndTextField = null;
        emailLabelAndTextField = null;
        webLabelAndTextField = null;
        celLabelAndTextField = null;
        bankNumberLabelAndTextField = null;
        lastUserLabelAndTextField = null;
        lastTimeLabelAndTextField = null;
        idLabelAndTextField = null;
        jScrollPane = null;
        notesJTextArea = null;
        accountingPanel = null;
        salesPersonLabelAndComboBox = null;
        paymentByLabelAndComboBox = null;
        cardNameLabelAndTextField = null;
        cardNumberLabelAndTextField = null;
        cardExpiryDateLabelAndDateComboBox = null;
        cardDigiCodeLabelAndTextField = null;
        jScrollPane1 = null;
        initialize();
    }

    private void initialize() {
        setJMenuBar(getBasicMenu());
        setFrameIcon(new ImageIcon(getClass().getResource("/org/jpgolay/wi/images/customerList16x16.png")));
        setTitle("CLIENT");
        setSize(340, 482);
        setContentPane(getJContentPane());
    }

    private JPanel getJContentPane() {
        if (jContentPane == null) {
            jContentPane = new JPanel();
            jContentPane.setLayout(new BorderLayout());
            jContentPane.add(getIconBar(), "North");
            jContentPane.add(getMainPanel(), "Center");
        }
        return jContentPane;
    }

    private BasicMenu getBasicMenu() {
        if (basicMenu == null) {
            basicMenu = new BasicMenu();
        }
        return basicMenu;
    }

    private IconBar getIconBar() {
        if (iconBar == null) {
            iconBar = new IconBar();
        }
        return iconBar;
    }

    private JPanel getMainPanel() {
        if (mainPanel == null) {
            mainPanel = new JPanel();
            mainPanel.setLayout(new BorderLayout());
            mainPanel.add(getCustomerSearch(), "North");
            mainPanel.add(getJScrollPane1(), "Center");
        }
        return mainPanel;
    }

    private SearchBox getCustomerSearch() {
        if (customerSearch == null) {
            customerSearch = new SearchBox();
            customerSearch.setPreferredSize(customerSearch.getSize());
            customerSearch.addPropertyChangeListener("icon", new PropertyChangeListener() {
                public void propertyChange(PropertyChangeEvent e) {
                    customerSearch.setPreferredSize(customerSearch.getSize());
                    getMainPanel().revalidate();
                }
            });
        }
        return customerSearch;
    }

    private JTabbedPane getJTabbedPane() {
        if (jTabbedPane == null) {
            jTabbedPane = new JTabbedPane();
            jTabbedPane.setPreferredSize(new Dimension(306, 380));
            jTabbedPane.addTab("Coordonn\351es", null, getAddressPanel(), null);
            jTabbedPane.addTab("Contact", null, getInfosPanel(), null);
            jTabbedPane.addTab("Compta", null, getAccountingPanel(), null);
        }
        return jTabbedPane;
    }

    private JPanel getAddressPanel() {
        if (addressPanel == null) {
            addressPanel = new JPanel();
            addressPanel.setLayout(new BorderLayout());
            addressPanel.add(getNamePanel(), "North");
            addressPanel.add(getAddressPanel1(), "Center");
            addressPanel.add(getLastUpdatePanel(), "South");
        }
        return addressPanel;
    }

    private JPanel getInfosPanel() {
        if (infosPanel == null) {
            FlowLayout flowLayout6 = new FlowLayout();
            infosPanel = new JPanel();
            infosPanel.setLayout(flowLayout6);
            flowLayout6.setVgap(2);
            infosPanel.add(getTelLabelAndTextField(), null);
            infosPanel.add(getCelLabelAndTextField(), null);
            infosPanel.add(getFaxLabelAndTextField(), null);
            infosPanel.add(getEmailLabelAndTextField(), null);
            infosPanel.add(getWebLabelAndTextField(), null);
            infosPanel.add(getJScrollPane(), null);
            infosPanel.add(getIdLabelAndTextField(), null);
        }
        return infosPanel;
    }

    private JPanel getAddressPanel1() {
        if (addressPanel1 == null) {
            FlowLayout flowLayout3 = new FlowLayout();
            addressPanel1 = new JPanel();
            addressPanel1.setLayout(flowLayout3);
            flowLayout3.setVgap(2);
            addressPanel1.setPreferredSize(new Dimension(308, 170));
            addressPanel1.add(getAddrLn1abelAndTextField(), null);
            addressPanel1.add(getAddrLn2abelAndTextField(), null);
            addressPanel1.add(getZipLabelAndTextField(), null);
            addressPanel1.add(getCityLabelAndTextField(), null);
            addressPanel1.add(getStateLabelAndTextField(), null);
            addressPanel1.add(getCountryLabelAndTextField(), null);
        }
        return addressPanel1;
    }

    private JPanel getNamePanel() {
        if (namePanel == null) {
            FlowLayout flowLayout1 = new FlowLayout();
            namePanel = new JPanel();
            namePanel.setLayout(flowLayout1);
            flowLayout1.setVgap(2);
            namePanel.setPreferredSize(new Dimension(627, 90));
            namePanel.add(getStatusLabelAndComboBox(), null);
            namePanel.add(getLastnameLabelAndTextField(), null);
            namePanel.add(getFirstnameLabelAndTextField(), null);
        }
        return namePanel;
    }

    private LabelAndTextField getFirstnameLabelAndTextField() {
        if (firstnameLabelAndTextField == null) {
            firstnameLabelAndTextField = new LabelAndTextField();
            firstnameLabelAndTextField.setLabel("Pr\351nom");
        }
        return firstnameLabelAndTextField;
    }

    private LabelAndComboBox getStatusLabelAndComboBox() {
        if (statusLabelAndComboBox == null) {
            statusLabelAndComboBox = new LabelAndComboBox();
            statusLabelAndComboBox.setLabel("Civilit\351");
            statusLabelAndComboBox.setList(WIUtil.STATUS);
        }
        return statusLabelAndComboBox;
    }

    private LabelAndTextField getAddrLn1abelAndTextField() {
        if (addrLn1abelAndTextField == null) {
            addrLn1abelAndTextField = new LabelAndTextField();
            addrLn1abelAndTextField.setLabel("Adresse");
        }
        return addrLn1abelAndTextField;
    }

    private LabelAndTextField getAddrLn2abelAndTextField() {
        if (addrLn2abelAndTextField == null) {
            addrLn2abelAndTextField = new LabelAndTextField();
            addrLn2abelAndTextField.setLabel(" ");
        }
        return addrLn2abelAndTextField;
    }

    private LabelAndTextField getCityLabelAndTextField() {
        if (cityLabelAndTextField == null) {
            cityLabelAndTextField = new LabelAndTextField();
            cityLabelAndTextField.setLabel("Ville");
        }
        return cityLabelAndTextField;
    }

    private LabelAndTextField getCountryLabelAndTextField() {
        if (countryLabelAndTextField == null) {
            countryLabelAndTextField = new LabelAndTextField();
            countryLabelAndTextField.setLabel("Pays");
        }
        return countryLabelAndTextField;
    }

    private LabelAndTextField getZipLabelAndTextField() {
        if (zipLabelAndTextField == null) {
            zipLabelAndTextField = new LabelAndTextField();
            zipLabelAndTextField.setLabel("Code postal");
        }
        return zipLabelAndTextField;
    }

    private JPanel getLastUpdatePanel() {
        if (lastUpdatePanel == null) {
            FlowLayout flowLayout4 = new FlowLayout();
            lastUpdatePanel = new JPanel();
            lastUpdatePanel.setLayout(flowLayout4);
            lastUpdatePanel.setPreferredSize(new Dimension(330, 90));
            flowLayout4.setVgap(2);
            lastUpdatePanel.add(getLastTimeLabelAndTextField(), null);
            lastUpdatePanel.add(getLastUserLabelAndTextField(), null);
        }
        return lastUpdatePanel;
    }

    private LabelAndTextField getLastnameLabelAndTextField() {
        if (lastnameLabelAndTextField == null) {
            lastnameLabelAndTextField = new LabelAndTextField();
            lastnameLabelAndTextField.setLabel("Nom");
        }
        return lastnameLabelAndTextField;
    }

    private LabelAndTextField getStateLabelAndTextField() {
        if (stateLabelAndTextField == null) {
            stateLabelAndTextField = new LabelAndTextField();
            stateLabelAndTextField.setLabel("Region");
        }
        return stateLabelAndTextField;
    }

    private LabelAndTextField getTelLabelAndTextField() {
        if (telLabelAndTextField == null) {
            telLabelAndTextField = new LabelAndTextField();
            telLabelAndTextField.setLabel("T\351l");
        }
        return telLabelAndTextField;
    }

    private LabelAndTextField getFaxLabelAndTextField() {
        if (faxLabelAndTextField == null) {
            faxLabelAndTextField = new LabelAndTextField();
            faxLabelAndTextField.setLabel("Fax");
        }
        return faxLabelAndTextField;
    }

    private LabelAndTextField getBankLabelAndTextField() {
        if (bankLabelAndTextField == null) {
            FlowLayout flowLayout5 = new FlowLayout();
            bankLabelAndTextField = new LabelAndTextField();
            bankLabelAndTextField.setLayout(flowLayout5);
            bankLabelAndTextField.setLabel("Nom de la banque");
            bankLabelAndTextField.setPreferredSize(new Dimension(306, 31));
            flowLayout5.setVgap(2);
        }
        return bankLabelAndTextField;
    }

    private LabelAndTextField getEmailLabelAndTextField() {
        if (emailLabelAndTextField == null) {
            emailLabelAndTextField = new LabelAndTextField();
            emailLabelAndTextField.setLabel("Email");
        }
        return emailLabelAndTextField;
    }

    private LabelAndTextField getWebLabelAndTextField() {
        if (webLabelAndTextField == null) {
            webLabelAndTextField = new LabelAndTextField();
            webLabelAndTextField.setLabel("Site web");
        }
        return webLabelAndTextField;
    }

    private LabelAndTextField getCelLabelAndTextField() {
        if (celLabelAndTextField == null) {
            celLabelAndTextField = new LabelAndTextField();
            celLabelAndTextField.setLabel("Portable");
        }
        return celLabelAndTextField;
    }

    private LabelAndTextField getBankNumberLabelAndTextField() {
        if (bankNumberLabelAndTextField == null) {
            bankNumberLabelAndTextField = new LabelAndTextField();
            bankNumberLabelAndTextField.setLabel("N\260 de compte");
        }
        return bankNumberLabelAndTextField;
    }

    private LabelAndTextField getLastUserLabelAndTextField() {
        if (lastUserLabelAndTextField == null) {
            lastUserLabelAndTextField = new LabelAndTextField();
            lastUserLabelAndTextField.setLabel("Modifi\351 par");
            lastUserLabelAndTextField.getTextField().setEditable(false);
        }
        return lastUserLabelAndTextField;
    }

    private LabelAndTextField getLastTimeLabelAndTextField() {
        if (lastTimeLabelAndTextField == null) {
            lastTimeLabelAndTextField = new LabelAndTextField();
            lastTimeLabelAndTextField.setLabel("Derni\350re modification");
            lastTimeLabelAndTextField.getTextField().setEditable(false);
        }
        return lastTimeLabelAndTextField;
    }

    private LabelAndTextField getIdLabelAndTextField() {
        if (idLabelAndTextField == null) {
            idLabelAndTextField = new LabelAndTextField();
            idLabelAndTextField.getTextField().setEditable(false);
            idLabelAndTextField.setLabel("Code");
        }
        return idLabelAndTextField;
    }

    private JScrollPane getJScrollPane() {
        if (jScrollPane == null) {
            jScrollPane = new JScrollPane();
            jScrollPane.setViewportView(getNotesJTextArea());
            jScrollPane.setPreferredSize(new Dimension(308, 140));
        }
        return jScrollPane;
    }

    private JTextArea getNotesJTextArea() {
        if (notesJTextArea == null) {
            notesJTextArea = new JTextArea();
            notesJTextArea.setRows(5);
            notesJTextArea.setWrapStyleWord(true);
            notesJTextArea.setLineWrap(true);
            notesJTextArea.setPreferredSize(new Dimension(290, 150));
            notesJTextArea.setToolTipText("Commentaires");
        }
        return notesJTextArea;
    }

    private JPanel getAccountingPanel() {
        if (accountingPanel == null) {
            FlowLayout flowLayout11 = new FlowLayout();
            accountingPanel = new JPanel();
            accountingPanel.setLayout(flowLayout11);
            flowLayout11.setVgap(2);
            accountingPanel.add(getBankLabelAndTextField(), null);
            accountingPanel.add(getBankNumberLabelAndTextField(), null);
            accountingPanel.add(getPaymentByLabelAndComboBox(), null);
            accountingPanel.add(getCardNameLabelAndTextField(), null);
            accountingPanel.add(getCardNumberLabelAndTextField(), null);
            accountingPanel.add(getCardExpiryDateLabelAndDateComboBox(), null);
            accountingPanel.add(getCardDigiCodeLabelAndTextField(), null);
            accountingPanel.add(getSalesPersonLabelAndComboBox(), null);
        }
        return accountingPanel;
    }

    private LabelAndComboBox getSalesPersonLabelAndComboBox() {
        if (salesPersonLabelAndComboBox == null) {
            salesPersonLabelAndComboBox = new LabelAndComboBox();
            salesPersonLabelAndComboBox.setLabel("Commercial");
        }
        return salesPersonLabelAndComboBox;
    }

    private LabelAndComboBox getPaymentByLabelAndComboBox() {
        if (paymentByLabelAndComboBox == null) {
            paymentByLabelAndComboBox = new LabelAndComboBox();
            paymentByLabelAndComboBox.setLabel("Mode de r\351glement");
            paymentByLabelAndComboBox.setList(WIUtil.PAYMENT_MODE);
            paymentByLabelAndComboBox.setSelectedIndex(0);
        }
        return paymentByLabelAndComboBox;
    }

    private LabelAndTextField getCardNameLabelAndTextField() {
        if (cardNameLabelAndTextField == null) {
            cardNameLabelAndTextField = new LabelAndTextField();
            cardNameLabelAndTextField.setLabel("Nom CB");
            cardNameLabelAndTextField.getTextField().setHorizontalAlignment(4);
        }
        return cardNameLabelAndTextField;
    }

    private LabelAndTextField getCardNumberLabelAndTextField() {
        if (cardNumberLabelAndTextField == null) {
            cardNumberLabelAndTextField = new LabelAndTextField();
            cardNumberLabelAndTextField.setLabel("Num\351ro CB");
            cardNumberLabelAndTextField.getTextField().setHorizontalAlignment(4);
        }
        return cardNumberLabelAndTextField;
    }

    private LabelAndDateComboBox getCardExpiryDateLabelAndDateComboBox() {
        if (cardExpiryDateLabelAndDateComboBox == null) {
            cardExpiryDateLabelAndDateComboBox = new LabelAndDateComboBox();
            cardExpiryDateLabelAndDateComboBox.setLabel("Expiration CB");
        }
        return cardExpiryDateLabelAndDateComboBox;
    }

    private LabelAndTextField getCardDigiCodeLabelAndTextField() {
        if (cardDigiCodeLabelAndTextField == null) {
            cardDigiCodeLabelAndTextField = new LabelAndTextField();
            cardDigiCodeLabelAndTextField.setLabel("Digicode CB");
            cardDigiCodeLabelAndTextField.getTextField().setHorizontalAlignment(4);
        }
        return cardDigiCodeLabelAndTextField;
    }

    public SearchBox getCustomerSearchBox() {
        return getCustomerSearch();
    }

    public BasicMenu getMenuPanel() {
        return getBasicMenu();
    }

    public IconBar getIconBarPanel() {
        return getIconBar();
    }

    public String getFirstnameValue() {
        return getFirstnameLabelAndTextField().getVal();
    }

    public void setFirstnameValue(String txt) {
        getFirstnameLabelAndTextField().setVal(txt);
    }

    public String getStatusValue() {
        return getStatusLabelAndComboBox().getSelectedString();
    }

    public void setStatusValue(String txt) {
        getStatusLabelAndComboBox().setSelectedString(txt);
    }

    public String getAddrLn1Value() {
        return getAddrLn1abelAndTextField().getVal();
    }

    public void setAddrLn1Value(String txt) {
        getAddrLn1abelAndTextField().setVal(txt);
    }

    public String getAddrLn2Value() {
        return getAddrLn2abelAndTextField().getVal();
    }

    public void setAddrLn2Value(String txt) {
        getAddrLn2abelAndTextField().setVal(txt);
    }

    public String getCityValue() {
        return getCityLabelAndTextField().getVal();
    }

    public void setCityValue(String txt) {
        getCityLabelAndTextField().setVal(txt);
    }

    public String getCountryValue() {
        return getCountryLabelAndTextField().getVal();
    }

    public void setCountryValue(String txt) {
        getCountryLabelAndTextField().setVal(txt);
    }

    public String getZipValue() {
        return getZipLabelAndTextField().getVal();
    }

    public void setZipValue(String txt) {
        getZipLabelAndTextField().setVal(txt);
    }

    public String getLastnameValue() {
        return getLastnameLabelAndTextField().getVal();
    }

    public void setLastnameValue(String txt) {
        getLastnameLabelAndTextField().setVal(txt);
    }

    public String getStateValue() {
        return getStateLabelAndTextField().getVal();
    }

    public void setStateValue(String txt) {
        getStateLabelAndTextField().setVal(txt);
    }

    public String getTelValue() {
        return getTelLabelAndTextField().getVal();
    }

    public void setTelValue(String txt) {
        getTelLabelAndTextField().setVal(txt);
    }

    public String getFaxValue() {
        return getFaxLabelAndTextField().getVal();
    }

    public void setFaxValue(String txt) {
        getFaxLabelAndTextField().setVal(txt);
    }

    public String getBankValue() {
        return getBankLabelAndTextField().getVal();
    }

    public void setBankValue(String txt) {
        getBankLabelAndTextField().setVal(txt);
    }

    public String getEmailValue() {
        return getEmailLabelAndTextField().getVal();
    }

    public void setEmailValue(String txt) {
        getEmailLabelAndTextField().setVal(txt);
    }

    public String getWebValue() {
        return getWebLabelAndTextField().getVal();
    }

    public void setWebValue(String txt) {
        getWebLabelAndTextField().setVal(txt);
    }

    public String getCelValue() {
        return getCelLabelAndTextField().getVal();
    }

    public void setCelValue(String txt) {
        getCelLabelAndTextField().setVal(txt);
    }

    public String getBankNumberValue() {
        return getBankNumberLabelAndTextField().getVal();
    }

    public void setBankNumberValue(String txt) {
        getBankNumberLabelAndTextField().setVal(txt);
    }

    public String getLastUserValue() {
        return getLastUserLabelAndTextField().getVal();
    }

    public void setLastUserValue(String txt) {
        getLastUserLabelAndTextField().setVal(txt);
    }

    public String getLastTimeValue() {
        return getLastTimeLabelAndTextField().getVal();
    }

    public void setLastTimeValue(String txt) {
        getLastTimeLabelAndTextField().setVal(txt);
    }

    public String getIdValue() {
        return getIdLabelAndTextField().getVal();
    }

    public void setIdValue(String txt) {
        getIdLabelAndTextField().setVal(txt);
    }

    public String getNotesValue() {
        return getNotesJTextArea().getText();
    }

    public void setNotesValue(String txt) {
        getNotesJTextArea().setText(txt);
    }

    public String getSalesPerson() {
        return getSalesPersonLabelAndComboBox().getSelectedString();
    }

    public void setSalesPerson(String txt) {
        getSalesPersonLabelAndComboBox().setSelectedString(txt);
    }

    public void setSalesPersonList(String list[]) {
        getSalesPersonLabelAndComboBox().setList(list);
    }

    public void setSalesPersonIndex(int index) {
        getSalesPersonLabelAndComboBox().setSelectedIndex(index);
    }

    public int getSalesPersonIndex() {
        return getSalesPersonLabelAndComboBox().getSelectedIndex();
    }

    public String getPaymentBy() {
        return getPaymentByLabelAndComboBox().getSelectedString();
    }

    public void setPaymentBy(String txt) {
        getPaymentByLabelAndComboBox().setSelectedString(txt);
    }

    public void setPaymentByList(String list[]) {
        getPaymentByLabelAndComboBox().setList(list);
    }

    public void setPaymentByIndex(int index) {
        getPaymentByLabelAndComboBox().setSelectedIndex(index);
    }

    public String getCardName() {
        return getCardNameLabelAndTextField().getVal();
    }

    public void setCardName(String txt) {
        getCardNameLabelAndTextField().setVal(txt);
    }

    public String getCardNumber() {
        return getCardNumberLabelAndTextField().getVal();
    }

    public void setCardNumber(String txt) {
        getCardNumberLabelAndTextField().setVal(txt);
    }

    public String getCardExpiryDate() {
        return getCardExpiryDateLabelAndDateComboBox().getDate();
    }

    public void setCardExpiryDate(String txt) {
        getCardExpiryDateLabelAndDateComboBox().setDate(txt);
    }

    public String getCardDigiCode() {
        return getCardDigiCodeLabelAndTextField().getVal();
    }

    public void setCardDigiCode(String txt) {
        getCardDigiCodeLabelAndTextField().setVal(txt);
    }

    public void cleanField() {
        setFirstnameValue("");
        setStatusValue("");
        setAddrLn1Value("");
        setAddrLn2Value("");
        setCityValue("");
        setCountryValue("");
        setZipValue("");
        setLastnameValue("");
        setStateValue("");
        setTelValue("");
        setFaxValue("");
        setBankValue("");
        setEmailValue("");
        setWebValue("");
        setCelValue("");
        setBankNumberValue("");
        setLastUserValue("");
        setLastTimeValue("");
        setIdValue("");
        setNotesValue("");
        setCardDigiCode("");
        setCardExpiryDate("01/01/2005");
        setCardNumber("");
        setCardName("");
        setSalesPersonIndex(0);
        setPaymentByIndex(0);
        setTitle("CLIENT");
    }

    public void setEnabledField(boolean b) {
        getFirstnameLabelAndTextField().getTextField().setEditable(b);
        getStatusLabelAndComboBox().getComboBox().setEnabled(b);
        getAddrLn1abelAndTextField().getTextField().setEditable(b);
        getAddrLn2abelAndTextField().getTextField().setEditable(b);
        getCityLabelAndTextField().getTextField().setEditable(b);
        getCountryLabelAndTextField().getTextField().setEditable(b);
        getZipLabelAndTextField().getTextField().setEditable(b);
        getLastnameLabelAndTextField().getTextField().setEditable(b);
        getStateLabelAndTextField().getTextField().setEditable(b);
        getTelLabelAndTextField().getTextField().setEditable(b);
        getFaxLabelAndTextField().getTextField().setEditable(b);
        getBankLabelAndTextField().getTextField().setEditable(b);
        getEmailLabelAndTextField().getTextField().setEditable(b);
        getWebLabelAndTextField().getTextField().setEditable(b);
        getCelLabelAndTextField().getTextField().setEditable(b);
        getBankNumberLabelAndTextField().getTextField().setEditable(b);
        getNotesJTextArea().setEditable(b);
        getCardExpiryDateLabelAndDateComboBox().setEnabledDateComboBox(b);
        getCardNumberLabelAndTextField().getTextField().setEditable(b);
        getCardNameLabelAndTextField().getTextField().setEditable(b);
        getPaymentByLabelAndComboBox().getComboBox().setEnabled(b);
        getSalesPersonLabelAndComboBox().getComboBox().setEnabled(b);
    }

    private JScrollPane getJScrollPane1() {
        if (jScrollPane1 == null) {
            jScrollPane1 = new JScrollPane();
            jScrollPane1.setViewportView(getJTabbedPane());
            jScrollPane1.setHorizontalScrollBarPolicy(31);
            jScrollPane1.setPreferredSize(new Dimension(306, 380));
        }
        return jScrollPane1;
    }
    private JPanel jContentPane;
    private BasicMenu basicMenu;
    private IconBar iconBar;
    private JPanel mainPanel;
    private SearchBox customerSearch;
    private JTabbedPane jTabbedPane;
    private JPanel addressPanel;
    private JPanel infosPanel;
    private JPanel addressPanel1;
    private JPanel namePanel;
    private LabelAndTextField firstnameLabelAndTextField;
    private LabelAndComboBox statusLabelAndComboBox;
    private LabelAndTextField addrLn1abelAndTextField;
    private LabelAndTextField addrLn2abelAndTextField;
    private LabelAndTextField cityLabelAndTextField;
    private LabelAndTextField countryLabelAndTextField;
    private LabelAndTextField zipLabelAndTextField;
    private JPanel lastUpdatePanel;
    private LabelAndTextField lastnameLabelAndTextField;
    private LabelAndTextField stateLabelAndTextField;
    private LabelAndTextField telLabelAndTextField;
    private LabelAndTextField faxLabelAndTextField;
    private LabelAndTextField bankLabelAndTextField;
    private LabelAndTextField emailLabelAndTextField;
    private LabelAndTextField webLabelAndTextField;
    private LabelAndTextField celLabelAndTextField;
    private LabelAndTextField bankNumberLabelAndTextField;
    private LabelAndTextField lastUserLabelAndTextField;
    private LabelAndTextField lastTimeLabelAndTextField;
    private LabelAndTextField idLabelAndTextField;
    private JScrollPane jScrollPane;
    private JTextArea notesJTextArea;
    private JPanel accountingPanel;
    private LabelAndComboBox salesPersonLabelAndComboBox;
    private LabelAndComboBox paymentByLabelAndComboBox;
    private LabelAndTextField cardNameLabelAndTextField;
    private LabelAndTextField cardNumberLabelAndTextField;
    private LabelAndDateComboBox cardExpiryDateLabelAndDateComboBox;
    private LabelAndTextField cardDigiCodeLabelAndTextField;
    private JScrollPane jScrollPane1;
}
